+Tue Apr 30 11:37:09 2002 Owen Taylor <otaylor@redhat.com>
+
+ * modules/input/gtkimcontextxim.c: Make multihead-safe;
+ use a different IM context per display.
+
+ * configure.in acconfig.h: Add Xinerama checks from
+ multihead branch, changing HAS_XINERAMA => HAVE_XINERAMA.
+
+ * gdk/x11/gdkdisplay-x11.c: HAS_XINERAMA => HAVE_XINERAMA.
+
+2002-04-29 Alex Larsson <alexl@redhat.com>
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors):
+ Use tmp also if foreground is set.
+
Mon Apr 29 18:28:00 2002 Owen Taylor <otaylor@redhat.com>
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
+Tue Apr 30 11:37:09 2002 Owen Taylor <otaylor@redhat.com>
+
+ * modules/input/gtkimcontextxim.c: Make multihead-safe;
+ use a different IM context per display.
+
+ * configure.in acconfig.h: Add Xinerama checks from
+ multihead branch, changing HAS_XINERAMA => HAVE_XINERAMA.
+
+ * gdk/x11/gdkdisplay-x11.c: HAS_XINERAMA => HAVE_XINERAMA.
+
+2002-04-29 Alex Larsson <alexl@redhat.com>
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors):
+ Use tmp also if foreground is set.
+
Mon Apr 29 18:28:00 2002 Owen Taylor <otaylor@redhat.com>
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
+Tue Apr 30 11:37:09 2002 Owen Taylor <otaylor@redhat.com>
+
+ * modules/input/gtkimcontextxim.c: Make multihead-safe;
+ use a different IM context per display.
+
+ * configure.in acconfig.h: Add Xinerama checks from
+ multihead branch, changing HAS_XINERAMA => HAVE_XINERAMA.
+
+ * gdk/x11/gdkdisplay-x11.c: HAS_XINERAMA => HAVE_XINERAMA.
+
+2002-04-29 Alex Larsson <alexl@redhat.com>
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors):
+ Use tmp also if foreground is set.
+
Mon Apr 29 18:28:00 2002 Owen Taylor <otaylor@redhat.com>
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
+Tue Apr 30 11:37:09 2002 Owen Taylor <otaylor@redhat.com>
+
+ * modules/input/gtkimcontextxim.c: Make multihead-safe;
+ use a different IM context per display.
+
+ * configure.in acconfig.h: Add Xinerama checks from
+ multihead branch, changing HAS_XINERAMA => HAVE_XINERAMA.
+
+ * gdk/x11/gdkdisplay-x11.c: HAS_XINERAMA => HAVE_XINERAMA.
+
+2002-04-29 Alex Larsson <alexl@redhat.com>
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors):
+ Use tmp also if foreground is set.
+
Mon Apr 29 18:28:00 2002 Owen Taylor <otaylor@redhat.com>
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
+Tue Apr 30 11:37:09 2002 Owen Taylor <otaylor@redhat.com>
+
+ * modules/input/gtkimcontextxim.c: Make multihead-safe;
+ use a different IM context per display.
+
+ * configure.in acconfig.h: Add Xinerama checks from
+ multihead branch, changing HAS_XINERAMA => HAVE_XINERAMA.
+
+ * gdk/x11/gdkdisplay-x11.c: HAS_XINERAMA => HAVE_XINERAMA.
+
+2002-04-29 Alex Larsson <alexl@redhat.com>
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors):
+ Use tmp also if foreground is set.
+
Mon Apr 29 18:28:00 2002 Owen Taylor <otaylor@redhat.com>
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
+Tue Apr 30 11:37:09 2002 Owen Taylor <otaylor@redhat.com>
+
+ * modules/input/gtkimcontextxim.c: Make multihead-safe;
+ use a different IM context per display.
+
+ * configure.in acconfig.h: Add Xinerama checks from
+ multihead branch, changing HAS_XINERAMA => HAVE_XINERAMA.
+
+ * gdk/x11/gdkdisplay-x11.c: HAS_XINERAMA => HAVE_XINERAMA.
+
+2002-04-29 Alex Larsson <alexl@redhat.com>
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors):
+ Use tmp also if foreground is set.
+
Mon Apr 29 18:28:00 2002 Owen Taylor <otaylor@redhat.com>
Integrate Erwann Chenede's multihead changes for the gtk/ directory.
struct _GtkXIMInfo
{
+ GdkDisplay *display;
XIM im;
char *locale;
XIMStyle style;
GType gtk_type_im_context_xim = 0;
-static GSList *open_ims = NULL;
+GSList *open_ims = NULL;
void
gtk_im_context_xim_register_type (GTypeModule *type_module)
}
static GtkXIMInfo *
-get_im (const char *locale)
+get_im (GdkDisplay *display,
+ const char *locale)
{
- GSList *tmp_list = open_ims;
+ GSList *tmp_list;
GtkXIMInfo *info;
XIM im = NULL;
+ tmp_list = open_ims;
while (tmp_list)
{
info = tmp_list->data;
- if (!strcmp (info->locale, locale))
+ if (info->display == display &&
+ strcmp (info->locale, locale) == 0)
return info;
tmp_list = tmp_list->next;
if (!XSetLocaleModifiers (""))
g_warning ("can not set locale modifiers");
- im = XOpenIM (GDK_DISPLAY(), NULL, NULL, NULL);
+ im = XOpenIM (GDK_DISPLAY_XDISPLAY (display), NULL, NULL, NULL);
if (im)
{
info = g_new (GtkXIMInfo, 1);
open_ims = g_slist_prepend (open_ims, im);
-
+
+ info->display = display;
info->locale = g_strdup (locale);
info->im = im;
context_xim->ic = NULL;
}
+ g_free (context_xim->locale);
g_free (context_xim->mb_charset);
}
reinitialize_ic (context_xim);
context_xim->client_window = client_window;
+
+ if (context_xim->client_window)
+ context_xim->im_info = get_im (gdk_drawable_get_display (context_xim->client_window), context_xim->locale);
+ else
+ context_xim->im_info = NULL;
}
GtkIMContext *
gtk_im_context_xim_new (void)
{
- GtkXIMInfo *info;
GtkIMContextXIM *result;
const gchar *charset;
- info = get_im (setlocale (LC_CTYPE, NULL));
- if (!info)
- return NULL;
-
result = GTK_IM_CONTEXT_XIM (g_object_new (GTK_TYPE_IM_CONTEXT_XIM, NULL));
- result->im_info = info;
+ result->locale = g_strdup (setlocale (LC_CTYPE, NULL));
g_get_charset (&charset);
result->mb_charset = g_strdup (charset);
KeySym keysym;
Status status;
gboolean result = FALSE;
+ GdkWindow *root_window = gdk_screen_get_root_window (gdk_drawable_get_screen (event->window));
XKeyPressedEvent xevent;
xevent.send_event = event->send_event;
xevent.display = GDK_DRAWABLE_XDISPLAY (event->window);
xevent.window = GDK_DRAWABLE_XID (event->window);
- xevent.root = GDK_ROOT_WINDOW();
+ xevent.root = GDK_DRAWABLE_XID (root_window);
xevent.subwindow = xevent.window;
xevent.time = event->time;
xevent.x = xevent.x_root = 0;
GdkRectangle rect;
GtkRequisition requisition;
gint y;
+ gint height = gdk_screen_get_height (gtk_widget_get_screen (toplevel));
+
gdk_window_get_frame_extents (toplevel->window, &rect);
gtk_widget_size_request (status_window, &requisition);
- if (rect.y + rect.height + requisition.height < gdk_screen_height ())
+ if (rect.y + rect.height + requisition.height < height)
y = rect.y + rect.height;
else
- y = gdk_screen_height () - requisition.height;
+ y = height - requisition.height;
gtk_window_move (GTK_WINDOW (status_window), rect.x, y);
GtkIMContext object;
GtkXIMInfo *im_info;
-
+
+ gchar *locale;
gchar *mb_charset;
GdkWindow *client_window;